Skip to content

fix(sidecar): remove hardcoded ACPX extension path that breaks npm hoisting#1135

Merged
myakove merged 2 commits into
mainfrom
fix/sidecar-acpx-extension-path
Jun 23, 2026
Merged

fix(sidecar): remove hardcoded ACPX extension path that breaks npm hoisting#1135
myakove merged 2 commits into
mainfrom
fix/sidecar-acpx-extension-path

Conversation

@myakove

@myakove myakove commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Problem

After merging #1127 (pi-sidecar migration), the sidecar logs show on container startup:

[sidecar] ACPX extension not found at /home/podman/github-webhook-server/sidecar-helper/node_modules/@myk-org/pi-sidecar/node_modules/pi-orchestrator-config/extensions/acpx-provider/index.ts: Error: ENOENT: no such file or directory

The SIDECAR_ACPX_EXTENSION_PATH env var in entrypoint.sh hardcodes a nested node_modules path, but npm hoisted pi-orchestrator-config to the top-level node_modules/.

Fix

Remove the SIDECAR_ACPX_EXTENSION_PATH export from entrypoint.sh. The sidecar's resolveExtensionPath() function already auto-resolves via require.resolve(), which correctly handles npm hoisting.

Changes

  • entrypoint.sh: Removed hardcoded SIDECAR_ACPX_EXTENSION_PATH export

…isting

The SIDECAR_ACPX_EXTENSION_PATH env var was hardcoded to a nested node_modules
path, but npm hoisted pi-orchestrator-config to the top-level node_modules.
The sidecar's resolveExtensionPath() auto-resolves via require.resolve,
so the env var override is unnecessary and breaks when npm hoisting changes.
@myakove-bot

Copy link
Copy Markdown
Collaborator

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: Disabled for this repository
  • Pre-commit Checks: pre-commit runs automatically if .pre-commit-config.yaml exists
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: All label categories are enabled (default configuration)

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest python-module-install - Test Python package installation
  • /retest pre-commit - Run pre-commit hooks and checks
  • /retest conventional-title - Validate commit message format
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 1 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • myakove
  • rnetser

Reviewers:

  • myakove
  • rnetser
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge
AI Features
  • Conventional Title: Mode: fix (claude/claude-opus-4-6-1m)
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
  • Test Oracle: Triggers: approved (claude/claude-opus-4-6[1m]); /test-oracle can be used anytime
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix sidecar startup by removing hardcoded ACPX extension path (npm hoisting-safe)
🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

Description

• Remove hardcoded ACPX extension path override from container entrypoint.
• Rely on sidecar’s built-in require.resolve() extension auto-resolution to handle npm hoisting.
Diagram

graph TD
  A["entrypoint.sh"] --> B["sidecar-helper server.js"] --> C["resolveExtensionPath()"] --> D["require.resolve()"] --> E["hoisted node_modules"]
  A --> F["main app (uv entrypoint.py)"]

  subgraph Legend
    direction LR
    _file["File / Script"] ~~~ _mod["Runtime module"]
  end
Loading
High-Level Assessment

Removing the hardcoded SIDECAR_ACPX_EXTENSION_PATH is the simplest and most robust fix because it avoids overriding the sidecar’s existing require.resolve()-based logic, which is designed to work with npm hoisting. A conditional or dynamically-computed export was considered but adds complexity without benefit if the sidecar already resolves correctly.

Files changed (1) +0 / -1

Bug fix (1) +0 / -1
entrypoint.shStop overriding ACPX extension path with a brittle nested node_modules location +0/-1

Stop overriding ACPX extension path with a brittle nested node_modules location

• Removes the 'SIDECAR_ACPX_EXTENSION_PATH' export that hardcoded a nested 'node_modules' path. This prevents startup failures when npm hoists 'pi-orchestrator-config' and allows the sidecar’s internal 'require.resolve()' resolution to work as intended.

entrypoint.sh

@qodo-code-review

qodo-code-review Bot commented Jun 23, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Previous review results

Review updated until commit e33dbf3

Results up to commit 4793993


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Qodo Logo

…xample

Add missing pi-sidecar env vars (ACPX_AGENTS, VERTEX_CLAUDE_1M, SIDECAR_PORT),
Vertex AI volume mount, and dual healthcheck for webhook server + sidecar.
@myakove myakove merged commit c86f926 into main Jun 23, 2026
4 of 10 checks passed
@myakove myakove deleted the fix/sidecar-acpx-extension-path branch June 23, 2026 12:49
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit e33dbf3

@myakove-bot

Copy link
Copy Markdown
Collaborator

New container for ghcr.io/myk-org/github-webhook-server:latest published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants